package com.sensoro.factoryconfig.ui;

import com.sensoro.factoryconfig.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class FrontActivity extends Activity implements OnClickListener {
	Button qrGunBtn;
	Button cameraBtn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		setContentView(R.layout.activity_front);
		super.onCreate(savedInstanceState);
		qrGunBtn = (Button) findViewById(R.id.qr_gun);
		cameraBtn = (Button) findViewById(R.id.camera);

		qrGunBtn.setOnClickListener(this);
		cameraBtn.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		Intent intent;
		switch (v.getId()) {
		case R.id.qr_gun:
			intent = new Intent(FrontActivity.this, QRGunActivity.class);
			startActivity(intent);
			break;
		case R.id.camera:
			intent = new Intent(FrontActivity.this, ScanCodeActivity.class);
			startActivity(intent);
			break;

		default:
			break;
		}
	}
}
